package com.iplant.pdm.service.po.bop;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.base.utils.annotation.join.multi.DBJoinMulti;
import com.iplant.base.utils.annotation.po.DBBasePO;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


@DBBasePO(TableName = "fpc_routestation",
        CheckName = {"RouteID,RoutePartID,RoutePartPointID,StationID"},
        Code = false, Name = false,
        Schemas = DBSchemas.PDM)
public class FPCRouteStation extends BasePO implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;


    @DBCondition
    @DBField
    public String Version = "";

    @DBCondition
    @DBField
    public int RouteID = 0; // 工艺版本ID


    @DBCondition
    @DBField
    public int ProductID = 0;

    @DBJoin(name = "Code", tableName = "fpc_route", tableAsName = "route1", Schemas = DBSchemas.PDM,
            MainTableField = "RouteID")
    public String RouteCode = "";

    @DBJoin(name = "Name", tableName = "fpc_route", tableAsName = "route1", Schemas = DBSchemas.PDM,
            MainTableField = "RouteID")
    public String RouteName = ""; // 工艺名称

    @DBJoin(name = "Version", tableName = "fpc_route", tableAsName = "route1", Schemas = DBSchemas.PDM,
            MainTableField = "RouteID")
    public String RouteVersion = "";


    @DBCondition
    @DBField
    public int RoutePartID = 0; // 工艺集ID

    /**
     * 标准工艺编号 提供标准工艺知识库
     */
    @DBJoin(name = "PartCode", tableName = "fpc_routepart", tableAsName = "routepart1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartID")
    public String PartCode = "";

    @DBJoin(name = "Code", tableName = "fpc_routepart", tableAsName = "routepart1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartID")
    public String RoutePartCode = "";

    @DBJoin(name = "Name", tableName = "fpc_routepart", tableAsName = "routepart1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartID")
    public String RoutePartName = "";

    @DBJoin(name = "Version", tableName = "fpc_routepart", tableAsName = "routepart1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartID")
    public String RoutePartVersion = "";


    @DBCondition
    @DBField
    public int RoutePartPointID = 0;
    @DBJoin(name = "Name", tableName = "fpc_routepartpoint", tableAsName = "routepartpoint1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartPointID")
    public String RoutePartPointName = "";

    @DBJoin(name = "Version", tableName = "fpc_routepartpoint", tableAsName = "routepartpoint1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartPointID")
    public String RoutePartPointVersion = "";
    @DBJoin(name = "Code", tableName = "fpc_routepartpoint", tableAsName = "routepartpoint1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartPointID")
    public String RoutePartPointCode = "";


    /**
     * Code 与Name 使用工位自身属性
     */
    @DBCondition
    @DBField
    public int StationID = 0;

    @DBJoin(name = "Code", tableName = "fmc_station", tableAsName = "st1", Schemas = DBSchemas.Basic,
            MainTableField = "StationID")
    public String StationCode = "";

    @DBJoin(name = "Name", tableName = "fmc_station", tableAsName = "st1", Schemas = DBSchemas.Basic,
            MainTableField = "StationID")
    public String StationName = "";

    /**
     * 可以安装设备ID
     **/
    @DBCondition(CompareType = DBCondition.DBCompareType.findInSet)
    @DBField
    public List<Integer> DeviceIDList = new ArrayList<Integer>();
    /**
     * 设备名称
     **/
    @DBJoinMulti(Name = "Name", TableName = "dms_device_ledger", MainTableField = "DeviceIDList", Schemas =
            DBSchemas.AMS)
    public String DeviceName = "";

    @DBJoinMulti(Name = "Code", TableName = "dms_device_ledger", MainTableField = "DeviceIDList", Schemas =
            DBSchemas.AMS)
    public String DeviceCode = "";


    /**
     * 资质证书
     */
    @DBField
    public String CERT = "";
    /**
     * 所需环境
     */
    @DBField
    public String ENVIR = "";

    /**
     * 检测方法
     */
    @DBField
    public String TestMethod = "";

    /**
     * 操作说明
     */
    @DBField
    public String Operation = "";

    @DBField
    public List<Integer> StationFixturesID = new ArrayList<Integer>();

    @DBJoinMulti(Name = "Name", MainTableField = "StationFixturesID", TableName = "ams_frocktool", Schemas =
            DBSchemas.AMS)
    public String StationFixturesName = "";

    @DBJoinMulti(Name = "Code", MainTableField = "StationFixturesID", TableName = "ams_frocktool", Schemas =
            DBSchemas.AMS)
    public String StationFixturesCode = "";

    /**
     * 标准工时
     */
    @DBField
    public float StandardPeriod = 0.0f;

    @JsonProperty("Version")
    public String getVersion() {
        return Version;
    }

    public void setVersion(String version) {
        Version = version;
    }

    @JsonProperty("RoutePartPointID")
    public int getRoutePartPointID() {
        return RoutePartPointID;
    }

    public void setRoutePartPointID(int routePartPointID) {
        RoutePartPointID = routePartPointID;
    }

    @JsonProperty("RoutePartPointName")
    public String getRoutePartPointName() {
        return RoutePartPointName;
    }

    public void setRoutePartPointName(String routePartPointName) {
        RoutePartPointName = routePartPointName;
    }

    @JsonProperty("RoutePartPointVersion")
    public String getRoutePartPointVersion() {
        return RoutePartPointVersion;
    }

    public void setRoutePartPointVersion(String routePartPointVersion) {
        RoutePartPointVersion = routePartPointVersion;
    }

    @JsonProperty("RoutePartPointCode")
    public String getRoutePartPointCode() {
        return RoutePartPointCode;
    }

    public void setRoutePartPointCode(String routePartPointCode) {
        RoutePartPointCode = routePartPointCode;
    }

    @JsonProperty("RoutePartID")
    public int getRoutePartID() {
        return RoutePartID;
    }

    public void setRoutePartID(int routePartID) {
        RoutePartID = routePartID;
    }


    @JsonProperty("RouteID")
    public int getRouteID() {
        return RouteID;
    }

    public void setRouteID(int routeID) {
        RouteID = routeID;
    }

    @JsonProperty("RouteCode")
    public String getRouteCode() {
        return RouteCode;
    }

    public void setRouteCode(String routeCode) {
        RouteCode = routeCode;
    }

    @JsonProperty("RouteName")
    public String getRouteName() {
        return RouteName;
    }

    public void setRouteName(String routeName) {
        RouteName = routeName;
    }

    @JsonProperty("RouteVersion")
    public String getRouteVersion() {
        return RouteVersion;
    }

    public void setRouteVersion(String routeVersion) {
        RouteVersion = routeVersion;
    }

    @JsonProperty("StationID")
    public int getStationID() {
        return StationID;
    }

    public void setStationID(int stationID) {
        StationID = stationID;
    }

    @JsonProperty("RoutePartName")
    public String getRoutePartName() {
        return RoutePartName;
    }

    public void setRoutePartName(String routePartName) {
        RoutePartName = routePartName;
    }

    @JsonProperty("RoutePartVersion")
    public String getRoutePartVersion() {
        return RoutePartVersion;
    }

    public void setRoutePartVersion(String routePartVersion) {
        RoutePartVersion = routePartVersion;
    }

    @JsonProperty("RoutePartCode")
    public String getRoutePartCode() {
        return RoutePartCode;
    }

    public void setRoutePartCode(String routePartCode) {
        RoutePartCode = routePartCode;
    }

    @JsonProperty("CERT")
    public String getCERT() {
        return CERT;
    }

    public void setCERT(String cERT) {
        CERT = cERT;
    }

    @JsonProperty("ENVIR")
    public String getENVIR() {
        return ENVIR;
    }

    public void setENVIR(String eNVIR) {
        ENVIR = eNVIR;
    }

    @JsonProperty("TestMethod")
    public String getTestMethod() {
        return TestMethod;
    }

    public void setTestMethod(String testMethod) {
        TestMethod = testMethod;
    }

    @JsonProperty("Operation")
    public String getOperation() {
        return Operation;
    }

    public void setOperation(String operation) {
        Operation = operation;
    }

    @JsonProperty("StationFixturesID")
    public List<Integer> getStationFixturesID() {
        return StationFixturesID;
    }

    public void setStationFixturesID(List<Integer> stationFixturesID) {
        StationFixturesID = stationFixturesID;
    }

    @JsonProperty("StationFixturesName")
    public String getStationFixturesName() {
        return StationFixturesName;
    }

    public void setStationFixturesName(String stationFixturesName) {
        StationFixturesName = stationFixturesName;
    }

    @JsonProperty("StationFixturesCode")
    public String getStationFixturesCode() {
        return StationFixturesCode;
    }

    public void setStationFixturesCode(String stationFixturesCode) {
        StationFixturesCode = stationFixturesCode;
    }


    @JsonProperty("ProductID")
    public int getProductID() {
        return ProductID;
    }

    public void setProductID(int productID) {
        ProductID = productID;
    }

    @JsonProperty("PartCode")
    public String getPartCode() {
        return PartCode;
    }

    public void setPartCode(String partCode) {
        PartCode = partCode;
    }

    @JsonProperty("StationCode")
    public String getStationCode() {
        return StationCode;
    }

    public void setStationCode(String stationCode) {
        StationCode = stationCode;
    }

    @JsonProperty("StationName")
    public String getStationName() {
        return StationName;
    }

    public void setStationName(String stationName) {
        StationName = stationName;
    }

    @JsonProperty("DeviceIDList")
    public List<Integer> getDeviceIDList() {
        return DeviceIDList;
    }

    public void setDeviceIDList(List<Integer> deviceIDList) {
        DeviceIDList = deviceIDList;
    }

    @JsonProperty("DeviceName")
    public String getDeviceName() {
        return DeviceName;
    }

    public void setDeviceName(String deviceName) {
        DeviceName = deviceName;
    }

    @JsonProperty("DeviceCode")
    public String getDeviceCode() {
        return DeviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        DeviceCode = deviceCode;
    }

    @JsonProperty("StandardPeriod")
    public float getStandardPeriod() {
        return StandardPeriod;
    }

    public void setStandardPeriod(float standardPeriod) {
        StandardPeriod = standardPeriod;
    }
}
